package me.caosh.jparser.model;

import com.google.common.collect.Lists;

import java.util.List;

/**
 * Created by caosh on 2016/11/9.
 */
public class Method {

    private String returns;
    private String name;
    private String document;
    private List<Parameter> parameterList = Lists.newArrayList();

    public String getReturns() {
        return returns;
    }

    public void setReturns(String returns) {
        this.returns = returns;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDocument() {
        return document;
    }

    public void setDocument(String document) {
        this.document = document;
    }

    public List<Parameter> getParameterList() {
        return parameterList;
    }

    public void addParameter(String type, String name) {
        parameterList.add(new Parameter(type, name));
    }

    @Override
    public String toString() {
        return "Method{" +
                "name='" + name + '\'' +
                ", document='" + document + '\'' +
                '}';
    }
}
